﻿<%@ page contentType="text/html;charset=UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>支付后台</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script src="../../scripts/boot.js" type="text/javascript"></script>
<style type="text/css">
body {
	margin: 0;
	padding: 0;
	border: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.header {
	background: url(../header.gif) repeat-x 0 -1px;
}

.Note {
	background: url(Notes_Large.png) no-repeat;
	width: 32px;
	height: 32px;
}

.Reports {
	background: url(Reports_Large.png) no-repeat;
	width: 32px;
	height: 32px;
}
</style>
</head>
<body style="min-width: 1000px;">
	<div id="layout1" class="mini-layout"
		style="width: 100%; height: 100%;">
		<div class="header" region="north" height="70" showSplit="false"
			showHeader="false">
			<h1
				style="margin: 0; padding: 15px; cursor: default; font-family: 'Trebuchet MS', Arial, sans-serif;">支付后台</h1>
			<div style="position: absolute; top: 18px; right: 10px;">
				<a class="mini-button mini-button-iconTop" iconCls="icon-edit"
					onclick="onClickpwd" plain="true">修改密码</a> <a
					class="mini-button mini-button-iconTop" iconCls="icon-close"
					onclick="onClickExit" plain="true">退出</a>&nbsp;&nbsp;
			</div>
		</div>
		<div title="south" region="south" showSplit="false" showHeader="false"
			height="25">
			<div style="line-height: 20px; text-align: right; cursor: default">Copyright
				© 版权所有</div>
		</div>
		<div title="center" region="center" bodyStyle="overflow:hidden;">
			<div id="mainTabs" class="mini-tabs" activeIndex="0"
				style="width: 100%; height: 100%;">
				<div title="首页" url="../User/main.jsp"></div>
				<div title="用户信息" url="../User/list.html"></div>
				<div title="获取积分记录" url="../ObtainIntegral/list.html"></div>
				<div title="积分兑换" url="../CreditsExchange/list.html"></div>
				<div title="积分兑换产品配置" url="../ExchangeType/list.html"></div>
				<div title="推广下线" url="../User/xialist.html"></div>
				<div title="联盟渠道管理" url="../Alliance/list.html"></div>
				<div title="消息盒" url="../Messages/list.html"></div>
				<div title="意见反馈" url="../Suggestion/list.html"></div>
				<div title="VIP会员" url="../User/viplist.html"></div>
				<div title="黑名单账户" url="../CreditsExchange/blacklist.html"></div>
				<div title="黑名单IP" url="../BlackIP/list.html"></div>
				<div title="广告配对" url="../Ad/list.html"></div>
				<div title="配置管理" url="../Setting/list.html"></div>
			</div>
		</div>
	</div>

	<div id="win1" class="mini-window" title="修改密码"
		style="width: 260px; height: 180px;" showToolbar="true"
		showFooter="true" showModal="false" allowResize="true"
		allowDrag="true">
		<div id="editform" class="form">
			<table style="width: 100%;">
				<tr>
					<td style="width: 80px;">旧密码：</td>
					<td style="width: 200px;"><input name="lopwd" required="true"
						vtype="rangeLength:5,10;" class="mini-password"
						class="mini-textbox" /></td>
				</tr>
				<tr>
					<td style="width: 80px;">新密码：</td>
					<td style="width: 180px;"><input name="newpwd" required="true"
						vtype="rangeLength:5,10;" class="mini-password"
						class="mini-textbox" /></td>
				</tr>
				<tr>
					<td style="width: 80px;">重复密码：</td>
					<td style="width: 180px;"><input name="fupwd" required="true"
						vtype="rangeLength:5,10;" class="mini-password"
						class="mini-textbox" /></td>
				</tr>
			</table>
		</div>
		<div property="footer"
			style="text-align: right; padding: 5px; padding-right: 15px;">
			<input type='button' value='保存' onclick="savehideWindow()"
				style='vertical-align: middle;' />
		</div>
	</div>

	<script type="text/javascript">
		mini.parse();
		var form = new mini.Form("#editform");
		var win = mini.get("win1");

		function onClickpwd(e) {
			win.show();
		}

		function onClickExit(e) {
			mini.confirm("您确定要退出吗？", "确定？", function(action) {
				if (action == "ok") {
					$.ajax({
						url : "/MyItem/pages/User/logout.do",
						type : "post",
						success : function(text) {
							window.location = "../../login.html";
						},
						error : function(jqXHR, textStatus, errorThrown) {
							window.location = "../../login.html";
						}
					});
				} else {

				}
			});
		}

		function savehideWindow() {
			form.validate();
			if (form.isValid() == false)
				return;
			var data = form.getData(); //获取表单多个控件的数据
			var json = mini.encode(data); //序列化成JSON
			mini.loading("请稍等...", "登录成功");
			$.ajax({
				url : "/ios/pages/User/resetpwd.do",
				type : "post",
				data : {
					submitData : json
				},
				success : function(text) {
					var o = mini.decode(text);
					if (o.state == "1") {
						mini.alert("请重新登陆");
					} else if (o.state == "2") {
						mini.alert("旧密码不一致");
					} else if (o.state == "3") {
						mini.alert("重复密码不一致");
					} else {
						win.hide();
						window.location = "../../login.html";
						form.clear();
					}
				},
				error : function(jqXHR, textStatus, errorThrown) {
					win.hide();
					window.location = "../../login.html";
				}
			});
		}
	</script>

</body>
</html>